package com.zzx.graduation.utils;

import com.zzx.graduation.entity.User;

import java.util.Map;
import java.util.Set;

public class StringUtils {
    /**
     * //用户列表：形如user1ID & user2ID
     * @param userStr
     * @return
     */
    public static Set<User> stringToSet(String userStr) {

        return null;
    }

    public static String arraryToString(Integer[] ids) {
        int length = ids.length - 1;
        String stringBuilder ="";
        boolean isFirst = true;
        while (length >= 0) {
            if (isFirst) {
                stringBuilder += ids[length];
                isFirst = false;
            }else {
                stringBuilder += ("&" + ids[length]);
            }
            length--;
        }
        return stringBuilder;
    }

}
